from rest_framework.pagination import PageNumberPagination


class CommonPageNumberPagination(PageNumberPagination):
    page_size = 2  # 每页显示的条数
    page_query_param = 'page'  # 第几页的查询参数
    # 定制形参
    page_size_query_param = 'page_size'
    max_page_size = 10  # 一页最大显示数据
